package com.ysl.study.designpattern.structure.decoration;

import lombok.Data;

import java.math.BigDecimal;

/**
 * 装饰器模式
 * ConcreteComponent（具体构件，或者基础构件）
 *
 * @author yangshanlin
 * @date 2023/2/23 18:06
 * @describe
 */
@Data
public class Person extends GongFu {

    public String name;

    public BigDecimal fight;

    public Person(String name, BigDecimal fight) {
        this.name = name;
        this.fight = fight;
    }

    @Override
    public BigDecimal attack() {
        return fight;
    }

}
